package io.renren.common.base;

import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * @author liangpei
 * @version 1.0
 * @description: okhttp3的响应基础类
 * @date 2024/3/15 11:12
 */
@Data
public class OkHttpClientResult {
    /**
     * 是否成功
     */
    private boolean success = false;

    /**
     * http级，状态标识码
     */
    private Integer code;

    /**
     * http级，错误信息
     */
    private String message;

    /**
     * http级，返回头部
     */
    private Map<String, List<String>> headers;

    /**
     * http级，返回body
     */
    private byte[] body;

    public OkHttpClientResult(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }
    public OkHttpClientResult(){}
}
